package com.simple.editor.util;

import javax.swing.*;

/**
 * Created with IntelliJ IDEA.
 * User: vsoroka
 * Date: 03.07.13
 * Time: 9:50
 * To change this template use File | Settings | File Templates.
 */
public class UIUtilities {

    private UIUtilities() {
    }

    public static void invoke(Runnable runnable) {
        if (SwingUtilities.isEventDispatchThread()) {
            runnable.run();
        } else {
            SwingUtilities.invokeLater(runnable);
        }
    }
}
